home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk152 / atree / seced.doc < prev    next >
Text File  |  1995-03-19  |  18KB  |  424 lines

  1.  
  2.  
  3.                            Atree Sector Editor
  4.  
  5.  
  6.  
  7. The Atree Sector Editor currently works only on disks using the trackdisk.
  8. device -- disks mounted on drives DF0: thru DF3: -- it will not yet work
  9. on hard disks, virtual disks, or the ramdisk.
  10.  
  11. To enter the sector editor, simply highlight a file or empty directory
  12. on a disk mounted on one of the floppy drives then select "Sector Edit"
  13. from the "Utils" menu of Atree.
  14.  
  15. If your Atree display highlighter is highlighting a file on a disk in
  16. one of the drives DF0: - DF3:, the sector editor will be activated
  17. and the first or File Header Block of the highlighted file will be displayed.
  18. If the directory is empty, the Directory Block will be displayed.
  19.  
  20. If you attempt to activate the sector editor for any device other than the
  21. trackdisk.device, you will get an error requestor.
  22.  
  23. Once in the sector editor, the options available are selectable from one of
  24. four menus or from the keyboard. All of the four menus (Mode, Display,
  25. Navigate, and Procedures) have letters to the right of the menu items.
  26. Pressing the corresponding key on the keyboard gives the same result as
  27. selecting the menu item with the mouse.
  28.  
  29. In the Navigate menu, the "->" and "<-" combination refer to the keyboard's 
  30. right and left arrow keys respectively.
  31.  
  32. For a detailed description of the AmigaDOS filing system pertaining to
  33. floppy disks, refer to one of the two works below:
  34.  
  35.                 The AmigaDOS Manual, Second Edition
  36.                     Commodore-Amiga, Inc.
  37.                     Bantam Books
  38.  
  39.                 Amiga Disk Drives Inside & Out
  40.                     Abacus Books
  41.                     5370 52nd Street SE
  42.                     Grand RApids, MI 49512
  43.  
  44. The Atree sector editor allows two ways of displaying disk sectors; Natural
  45. and Logical. With any sector displayed, press "n" then "l" and you will
  46. toggle back and forth between the two modes.
  47.  
  48.  
  49. Natural Display Mode:
  50. ---------------------
  51.  
  52. In this mode, the user is simply shown the raw data of the sector in
  53. natural order. There is no text in the display to help the user
  54. understand what is being viewed.
  55.  
  56. In Natural Display mode, the user may select to have each byte of data
  57. in the sector displayed in either ASCII or HEX format. To toggle
  58. between these, select "Ascii" or "Hex" from the "Display" menu.
  59.  
  60. In natural hex mode, all 512 bytes of the sector are displayed in hexadecimal
  61. format (for those not familiar with the hexadecimal numbering system, see
  62. the file named "Numbering_Tutorial" on this disk). The hexadecimal
  63. numbers in the extreme left column of this display (the three digit
  64. numbers) reperesent the offset from the beginning of the sector of the first
  65. byte in the row.
  66.  
  67. In this mode, the user may click the left mouse button with the mouse
  68. pointer on any byte in the sector -- a requestor will appear showing
  69. a total of four bytes. Each byte is part of a long word as measured from
  70. offset zero -- you are presented with the long word to which the selected
  71. byte belongs. The byte you selected may therefore appear in any one of
  72. the four positions of the bytes in the long word within the requestor.
  73.  
  74. Thus, in natural hex mode, the sector may be edited one long word at a time.
  75.  
  76. In natural ascii mode, the bytes of the sector are displayed in ASCII
  77. format in 8 rows of 64 bytes. This mode is of course useful when you
  78. are looking for text strings in program code or are viewing a text file.
  79.  
  80. In ASCII mode, all values outside the ASCII range are displayed on your
  81. screen as a reverse-video space with a dot in the lower right hand corner;
  82. this corresponds to hex value 1F, decimal 31.
  83.  
  84. While in natural ascii display mode, If you click the left mouse button
  85. with the mouse pointer anywhere in a row, you will be presented with a
  86. requestor that will allow you to edit the entire row.
  87.  
  88. To save edits to disk, simply select the "Write" item from the "Procedures"
  89. menu.
  90.  
  91. Logical Display Mode:
  92. ---------------------
  93.  
  94. The Logical Display mode is more helpful in understanding what you are
  95. looking at.  Even very experienced and knowledgeable users will probably
  96. opt to use this mode regularly.
  97.  
  98. There are five kinds of sectors or blocks on floppy disks. Each is 512 bytes,
  99. or 128 long words. The five types are:
  100.  
  101.                                                             Root Block
  102.                                                             User Directory Block
  103.                                                             File Header Block
  104.                                                             File List Block
  105.                                                             File Data Block
  106.  
  107. Should you request to read a sector and the type of sector, due perhaps
  108. to disk corruption, is not a recognized AmigaDOS sector type, that sector
  109. will be displayed with the comment "Block Type: Not Known". To get out
  110. of this display, select one of the options from the "Navigate" menu.
  111. Note that Bitmap blocks will yield the above message, but you can view
  112. and edit them anyway.
  113.  
  114. In Logical Display mode all of the data in each block is shown. But it is
  115. not shown in its natural order as it occurs in the block. Additionally,
  116. the display contains text strings which are useful in describing or
  117. defining what you are looking at.
  118.  
  119. When in Logical display mode, only the File Data Block display responds
  120. to your request to view in Ascii or Hex. And only the data portion of that
  121. block will be shown in Ascii or Hex. All other block types will not
  122. respond at all to a request for Ascii or Hex display. To see other blocks
  123. in Ascii, you must select "Natural" from the "Display" menu and then, if not
  124. already in Ascii mode, select "Ascii" from the "Display" menu.
  125.  
  126. What you see in each block is outlined below.
  127.  
  128. The Root Block:
  129. ---------------
  130.  
  131. To locate the Root Block of any floopy disk, press the "g" key or select
  132. "Goto" from the "Navigate" menu and enter the hex value 370 or the decimal
  133. value 880 (always precede hex values with a "$").
  134.  
  135. In the display, all block values are given in hexadecimal.
  136.  
  137. This block is displayed in two rectangular boxes.
  138.  
  139. The top, or smaller, box contains 6 screen lines. The information on
  140. these lines is as follows:
  141.  
  142. Line 1: States that you are looking at a Root Block and gives the
  143.                 Type (always 2), and Secondary Type (always 1).
  144.  
  145. Line 2: Tells you the creation date of the disk in days, minutes, and
  146.                 ticks (Tks) -- a tick is 1/50 of a second.
  147.  
  148. Line 3: Tells you the name length and name of the disk (label or volume).
  149.  
  150. Line 4: Tells you the status of the Bitmap (FFFFFFFF if good) and gives you
  151.                 the sector number of the first block of the bitmap.
  152.  
  153. Line 5: Tells you the size of the Hash Table in the Root Block and
  154.                 tells you what the Checksum for the block is.
  155.  
  156. Line 6: Tells you the date, in days, minutes and ticks, the disk was last
  157.                 altered.
  158.  
  159.  
  160. The larger or bottom box shows the complete hash table of the Root Block.
  161. The standard size is 72 long words (48 hex). Each entry in the hash table
  162. is the sector number of a user directory block or file header block.
  163.  
  164. The "Mode" menu of the sector editor contains two items -- "View" and
  165. "Edit".
  166.  
  167. If "View" is selected, then any time you click the left mouse button on
  168. a value which represents a disk sector number, the sector editor will read
  169. the sector and display it for you.
  170.  
  171. Thus, if you click on line 4 where it says "First Block", you will be shown
  172. the first block of the disk's bitmap. Since bitmap blocks do not have a type
  173. assigned to them, the Atree sector editor will display the bitmap block in
  174. natural mode and will tell you "Block Type: not known". To get back to the
  175. root block, press the left arrow key or select "Previous" from the
  176. "Navigate" menu.
  177.  
  178. In "View" mode you can also click on any of the hash table entries and the
  179. sector so selected will be displayed. You may return to the root block by
  180. pressing the left arrow key.
  181.  
  182. While in "View" mode, if you click on a value that DOES NOT represent a
  183. disk sector, such as the name of the disk, you will be given a requester
  184. that allows you to edit that value.
  185.  
  186. If you select the "Edit"  mode from the "Mode" menu, then when you click on
  187. any value in the Root Block display, you will be able to edit it.
  188.  
  189. In summary, "View" mode allows you to view or display sectors if you click
  190. on them and to edit other non-sector values if you click on them. "Edit"
  191. mode allows you to edit all values if you click on them.
  192.  
  193.  
  194. User Directory Block:
  195. ---------------------
  196.  
  197. The display of a User Directory Block looks a lot like the Root Block.
  198. In the top, or smaller, box there are six lines. The information on
  199. each line is as follows:
  200.  
  201. Line 1: You are told you are looking at a Directory block and you are
  202.                 given the type (always 2) and the Secondary Type (always 2).
  203.  
  204. Line 2: You are given the date (in Days, Minutes, and Ticks) the directory
  205.                 was created.
  206.  
  207. Line 3: You are given the name length and the name of the directory.
  208.  
  209. Line 4: You are given the sector number of this directory block (the Key),
  210.                 and the parent directory sector number (Par). You are then given
  211.                 the sector number of the next directory or file with the same
  212.                 hash value (Nxt), if there is one. Last, you are given the
  213.                 protection (Pro) for this directory.
  214.  
  215. Line 5: You are given the Checksum for this sector and the length of
  216.                 the comment, if one, associated with this directory.
  217.  
  218. Line 6: You are given the comment, if one, associated with this directory.
  219.  
  220. In the lower, or larger, box is the hash table associated with this
  221. directory.
  222.  
  223. As with the Root Block, "View" mode allows you to edit all non-sector
  224. values if you click on them, and to view all sectors if you click on them.
  225. "Edit" mode allows you to edit all values in the block. See the discussion
  226. of "View" and "Edit" modes under the heading "The Root Block" above.
  227.  
  228.  
  229. File Header Block:
  230. ------------------
  231.  
  232. As with the Root and Directory blocks, the File Header Block display consists
  233. of two rectangular boxes. The smaller box at the top of the display contains
  234. seven lines of information as follows:
  235.  
  236. Line 1: You are told what kind of block this is (File Hdr), and you are
  237.                 given the "Type" and "Secondary Type" (Always 2 and FFFFFFFD
  238.                 respectively).
  239.  
  240. Line 2: You are given the date (in days, minutes, and ticks) the file
  241.                 was created on this disk.
  242.  
  243. Line 3: You are given the name length and the name of this file.
  244.  
  245. Line 4: You are given the sector number of this file header block (Key),
  246.                 the parent directory of this file (Par), the sector number of the
  247.                 next file/directory that yields the same hash value, if one, (Nxt),
  248.                 and you are given the protection associated with this file (Pro).
  249.  
  250. Line 5: You are given the Checksum for this header block, the sector number
  251.                 of the File List Block, if one, associated with this file, and you
  252.                 are given the length of the comment (ComLen), if one, associated with
  253.                 this file.
  254.  
  255. Line 6: You are given the comment associated with this file, if one.
  256.  
  257. Line 7: You are given the total number of data block sectors entered in this
  258.                 file block's Data Table (Entries), the sector number of the first data
  259.                 block of this file (1stBlock), and the total number of bytes in the
  260.                 file.
  261.  
  262. The lower, or larger, box in the display is the Data Table showing the
  263. sector numbers of the data blocks associated with this file. To read a
  264. file in order from beginning to end, you must read the sectors in order
  265. starting with the one in the lower right hand corner of this block and
  266. working backward.
  267.  
  268. "View" and "Edit" modes function the same for File Header Blocks as they
  269. do for Root and Directory blocks. See the discussion of "View" and "Edit"
  270. under the heading "The Root Block" above.
  271.  
  272.  
  273. File List Block:
  274. ----------------
  275.  
  276. List blocks are blocks which contain the sector numbers of additional
  277. file data blocks in cases where the File Header Block did not have enough
  278. room to store all the sector numbers of the data blocks associated with the
  279. file. File Header Blocks can hold the sector numbers of up to 72 data blocks.
  280. If a file needs more data blocks, a File List Block is created to contain
  281. the additional sector numbers. The File Header Block contains the sector number
  282. of this list block, if one is used or needed.
  283.  
  284. The File List Block is displayed in two rectangular boxes. The upper smaller
  285. box contains three line of information as follows:
  286.  
  287. Line 1: You are told you are looking at a File List Block (List Block),
  288.                 and you are given the Type and Secondary Type of this block
  289.                 (always hex 10 and FFFFFFFD respectively).
  290.  
  291. Line 2: You are given the sector number of this File List Block's sector
  292.                 (Key); you are given the block's Checksum, and you are given the
  293.                 number of sector number entries of additional data blocks contained
  294.                 in this block (NumBlocks).
  295.  
  296. Line 3: You are given the sector number of the File Header Block that this
  297.                 File List Block belongs to or is associated with (Hdr Key), and you
  298.                 are given the sector number of the next list block, if one.
  299.  
  300. The bottom box in this display contains a list or table of sector number
  301. entries representing the additional data sectors associated with the file.
  302.  
  303. As with the File Header Block, these sectors must be read in order
  304. backward from the lower right hand corner of the box.
  305.  
  306. "View" and "Edit" modes function the same for File List Blocks as they
  307. do for Root and Directory blocks. See the discussion of "View" and "Edit"
  308. under the heading "The Root Block" above.
  309.  
  310.  
  311. File Data Block:
  312. ----------------
  313.  
  314. File Data blocks contain (on floppy disks) 488 bytes of actual file data, and
  315. 24 bytes (six long words) of descriptive data pertaining to the data block.
  316.  
  317. The display consists of two line of text at the top of the screen and
  318. a rectangular box below.
  319.  
  320. The two lines of text contain the following information:
  321.  
  322. Line 1: You are told the kind of block you are looking at (Data Block);
  323.                 you are given the Type for this block (Always 8), and you are given
  324.                 the sequence number of this data block (SeqNum) -- the sequence number
  325.                 is simply the number of the block as counted from the beginning.
  326.                 A SeqNum of 54 means this is the 54th data block in the file.
  327.  
  328. Line 2: You are given the total number of bytes of actual file data
  329.                 contained in this block -- a full block should have hex 1E8
  330.                 or decimal 488 bytes. You are next given the sector number
  331.                 of the next (in sequence) data block of the file (Nxt Blk),
  332.                 and you are given the Checksum for this block.
  333.  
  334.  
  335. The rectangular box at the bottom of the screen contains the 488 bytes of the
  336. block that are used for data -- whether all of them or just some of them
  337. actually represent data depends on whether or not the block is full, but you are
  338. shown all of the bytes in either case. 
  339.  
  340. "View" and "Edit" modes function the same for Data Blocks as they
  341. do for Root and Directory blocks. See the discussion of "View" and "Edit"
  342. under the heading "The Root Block" above.
  343.  
  344. From the "Display" menu, you may select "Hex" or "Ascii" modes to view
  345. the data in the data block.
  346.  
  347.  
  348. Sector Editor Menus:
  349.  
  350. Below is a quick description of the Atree Sector Editor menu options.
  351.  
  352.  
  353. Mode Menu:
  354. ----------
  355.  
  356. The two options (View and Edit) in this menu pertain only to the logical
  357. display mode. In the natural display mode, you may edit any value in the
  358. disk sector by clicking the left mouse button with the mouse pointer on the
  359. value you wish to modify. You will then be given a requester containing the
  360. long word to which that value belongs.
  361.  
  362. In logical display mode, the "View" option permits you to click the left
  363. mouse button on sector values which, by design, are supposed to represent
  364. disk sectors. The sector editor will then read and display that sector.
  365. However, in "View" mode, clicking on any other sector values will present
  366. you with a requester permitting you to edit the value in question.
  367.  
  368. In "Edit" mode, any sector values you click on will give you a requester
  369. so that you may edit the value.
  370.  
  371. In natural display mode, either displayed as Ascii or Hex, you can only
  372. edit values no matter what they represent.
  373.  
  374. In logical display mode, you have two choices -- view and edit; view
  375. allows you to easily navigate around a disk by clicking on sector values
  376. and edit allows you to edit the sector values if you want to.
  377.  
  378. Display Menu:
  379. -------------
  380.  
  381. The Display Menu has four options; Ascii, Hex, Natural and Logical.
  382.  
  383. Ascii and Hex options allow you to display the data in ascii or hex
  384. only when you are in the natural mode. The one exception is that
  385. File Data blocks in logical mode will have the data portion of the block
  386. displayed in ascii if requested.
  387.  
  388. Natural and Logical modes are fully discussed in sections devoted to them
  389. above.
  390.  
  391. Navigate Menu:
  392. --------------
  393.  
  394. The sector editor maintains a qeueu of the last 20 sectors read. Pressing
  395. the left arrow key or selecting "Previous" from this menu will allow you to
  396. recall and display the last sector read. Pressing the right arrow key will
  397. allow you to read the "next" sector in the qeueu. If you are already on the
  398. last sector entered in the qeueu and you press the right arrow key, you will
  399. read and display the first element of the qeueu, which may be the first sector
  400. you read in the current session. If you are on the first element of the qeueu
  401. already and you press the left arrow key, you will read and display the last
  402. sector entered in the qeueu.
  403.  
  404. Example: You enter the sector editor with block 0x373 displayed. You
  405. then request to read 0x165 and 0x166. Sector 0x166 is currently being
  406. displayed. If you press the right arrow key, sector 0x373 will be
  407. read and displayed. If you press the left arrow key, sector 0x165 will
  408. be displayed. 
  409.  
  410. The "Goto" option permits you to enter a sector value. The sector editor will
  411. then read and display the sector, or give you a requester if you entered
  412. a value too large or too small. Floppy disks have 1760 sectors, numbered
  413. from 0 to 1759 -- any other number is out of range.
  414.  
  415. Procedures Menu:
  416. ----------------
  417.  
  418. You may save any sector edits by selecting the "Write" option.
  419.  
  420. The currently displayed sector's Checksum is calculated and modified on
  421. screen by selecting the "Do CkSum" option. This new calculation is
  422. not saved to disk.
  423.  
  424.